#include "gameParameters.h"
using namespace std;

double GameParameters::gravity							= 0.01;
double GameParameters::angle							= 0.001;
bool GameParameters::flyMode							= true;
bool GameParameters::applyGravity						= false;
int GameParameters::screenWidth							= 1024;
int GameParameters::screenHeight						= 800;
double GameParameters::groundLevel						= -12;
double GameParameters::levelOfResettingPlayerPosition	= 0;
double GameParameters::refreshRate						= 30;
double GameParameters::maxFallingSpeed					= 0.6;
char GameParameters::opponentsPath[128]					= "";
char GameParameters::weaponsPath[128]					= "";
double GameParameters::distanceToPlayerToAttack			= 6;

void GameParameters::setFlyMode(bool enabled)
{
	flyMode = enabled;
	applyGravity = !enabled;
}

char* GameParameters::getOpponentsPath(char *file)
{
	char *path = new char[128];
	strcpy_s(path, strlen(path), opponentsPath);
	strcat_s(path, strlen(path), file);
	//TODO: delete path when stops beeing necessary...
	return path;
}

char* GameParameters::getWeaponsPath(char *file)
{
	char *path = new char[128];
	strcpy_s(path, strlen(path), weaponsPath);
	strcat_s(path, strlen(path), file);
	//TODO: delete path when stops beeing necessary...
	return path;
}